package com.wander.methoddemo.a03staticdemo;

import java.util.ArrayList;

public class StudentUtil {
    private StudentUtil(){    }

    public static int getMaxAgeStudent(ArrayList<Student> list){
        int max = list.get(0).getAge();
        for (int i = 0; i < list.size() ; i++) {
            int tempMax = list.get(i).getAge();
            if (tempMax >max){
                max = tempMax;
            }
        }
        return max;
    }
}
